package com.saoft.fangcms.modules.cms.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;

/**
 * <p>
 * 注入数据
 * </p>
 *
 * @author scc95599
 * @since 2020-01-12
 */
@TableName("cms_template_data")
public class TemplateData extends Model<TemplateData> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 类型id
     */
    private Integer ptypeId;

    /**
     * 名称
     */
    private String name;

    /**
     * 数据编码
     */
    private String code;

    /**
     * 查询数据sql
     */
    private String sqlCode;

    /**
     * 查询条件列
     */
    private String whereColumn;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }
    public Integer getPtypeId() {
        return ptypeId;
    }

    public void setPtypeId(Integer ptypeId) {
        this.ptypeId = ptypeId;
    }
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }
    public String getSqlCode() {
        return sqlCode;
    }

    public void setSqlCode(String sqlCode) {
        this.sqlCode = sqlCode;
    }
    public String getWhereColumn() {
        return whereColumn;
    }

    public void setWhereColumn(String whereColumn) {
        this.whereColumn = whereColumn;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "TemplateData{" +
            "id=" + id +
            ", ptypeId=" + ptypeId +
            ", name=" + name +
            ", code=" + code +
            ", sqlCode=" + sqlCode +
            ", whereColumn=" + whereColumn +
        "}";
    }
}
